//
//  RFAPasteboardOwner.m
//  RFA Manager
//
//  Created by Torsten Kammer on 02.04.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "RFAPasteboardOwner.h"
#import "RFATreeNode.h"

@implementation RFAPasteboardOwner

- (id)initWithNode:(RFATreeNode *)node;
{
	if (![super init]) return nil;
	
	wrapper = node.fileWrapper;
	
	return self;
}

- (void)pasteboard:(NSPasteboard *)sender provideDataForType:(NSString *)type
{
	if (![type isEqual:NSFileContentsPboardType]) [NSException raise:NSInternalInconsistencyException format:@"Asked RFAPasteboardOwner for data for unknown type %@", type];
	[sender setData:wrapper.serializedRepresentation forType:type];
}

@end
